/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package proyecto.jpa;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

/**
 *
 * @author Administrador
 */
@Entity
@Table(name = "localclinica")
@NamedQueries({@NamedQuery(name = "Localclinica.findAll", query = "SELECT l FROM Localclinica l"), @NamedQuery(name = "Localclinica.findByCodigoLocal", query = "SELECT l FROM Localclinica l WHERE l.codigoLocal = :codigoLocal"), @NamedQuery(name = "Localclinica.findByNombre", query = "SELECT l FROM Localclinica l WHERE l.nombre = :nombre")})
public class Localclinica implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "codigoLocal")
    private Integer codigoLocal;
    @Column(name = "nombre")
    private String nombre;
    @Lob
    @Column(name = "direccion")
    private String direccion;

    public Localclinica() {
    }

    public Localclinica(Integer codigoLocal) {
        this.codigoLocal = codigoLocal;
    }

    public Integer getCodigoLocal() {
        return codigoLocal;
    }

    public void setCodigoLocal(Integer codigoLocal) {
        this.codigoLocal = codigoLocal;
    }

    public String getNombre() {
        return nombre;
    }

    public void setNombre(String nombre) {
        this.nombre = nombre;
    }

    public String getDireccion() {
        return direccion;
    }

    public void setDireccion(String direccion) {
        this.direccion = direccion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codigoLocal != null ? codigoLocal.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Localclinica)) {
            return false;
        }
        Localclinica other = (Localclinica) object;
        if ((this.codigoLocal == null && other.codigoLocal != null) || (this.codigoLocal != null && !this.codigoLocal.equals(other.codigoLocal))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "proyecto.jpa.Localclinica[codigoLocal=" + codigoLocal + "]";
    }

}
